package com.kly.sc.api.application;

import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Created with IntelliJ IDEA.
 * User: yujianfu (mr.vencnet@gmail.com)
 * Date: 2018/8/15
 * Time: 下午8:03
 */
@ComponentScan(basePackages = {
		"com.kly",
		"com.chenchao.component"
})
@ImportResource({
		"classpath*:app-redis.xml",
		"classpath*:amazon-s3-service.xml",
		"classpath:dubbo-consumer.xml",
		"classpath:message-context.xml"

})
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, XADataSourceAutoConfiguration.class})
@NacosPropertySource(dataId = "sc-api", autoRefreshed = true)
@EnableSwagger2
public class ApiApplication {
	public static void main(String[] args) {
		SpringApplication.run(ApiApplication.class, args);
	}
}
